﻿using System;
using System.Linq;
using System.Text;

using SqlSugar;
namespace SimpleORM.Model.DataBaseModel.SYSModelmain
{
    ///<summary>
    ///
    ///</summary>
    [Tenant("0")]
    public partial class SysUser
    {
           public SysUser(){

            this.UserSex =Convert.ToString("M");
            this.ChangePasswordDate =DateTime.Now;
            this.IsPasswordLongLive =true;
            this.IsChangePasswordWhenLogin =true;
            this.IsActivity =true;
            this.Protected =false;
            this.NoCheckEndDate =false;
            this.IsOnline =false;
            this.UserStatus =Convert.ToString("N'在职'");
            this.IsAccount =true;
            this.IsVendorUser =false;
            this.IsOMFUser =false;
            this.IsAdmin =false;
            this.ModifyDate =DateTime.Now;
            this.CreateDate =DateTime.Now;

           }
           /// <summary>
           /// Desc:用户ID
           /// Default:
           /// Nullable:False
           /// </summary>
           [Newtonsoft.Json.JsonConverter(typeof(ValueToStringConverter))]           
           [SugarColumn(IsPrimaryKey=true)]
           public long UserId {get;set;}

           /// <summary>
           /// Desc:用户名称
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string UserName {get;set;}

           /// <summary>
           /// Desc:用户描述
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string UserDescription {get;set;}

           /// <summary>
           /// Desc:性别
           /// Default:M
           /// Nullable:True
           /// </summary>           
           public string UserSex {get;set;}

           /// <summary>
           /// Desc:密码
           /// Default:
           /// Nullable:True
           /// </summary>           
           public byte[] UserPassword {get;set;}

           /// <summary>
           /// Desc:部门
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string Division {get;set;}

           /// <summary>
           /// Desc:部门ID
           /// Default:
           /// Nullable:True
           /// </summary>
           [Newtonsoft.Json.JsonConverter(typeof(ValueToStringConverter))]           
           public long? DivisionId {get;set;}

           /// <summary>
           /// Desc:职务
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string duties {get;set;}

           /// <summary>
           /// Desc:上次修改密码的日期
           /// Default:DateTime.Now
           /// Nullable:True
           /// </summary>           
           public DateTime? ChangePasswordDate {get;set;}

           /// <summary>
           /// Desc:密码不过期
           /// Default:1
           /// Nullable:True
           /// </summary>           
           public bool? IsPasswordLongLive {get;set;}

           /// <summary>
           /// Desc:进入系统时是否修改密码
           /// Default:1
           /// Nullable:True
           /// </summary>           
           public bool? IsChangePasswordWhenLogin {get;set;}

           /// <summary>
           /// Desc:是否激活
           /// Default:1
           /// Nullable:True
           /// </summary>           
           public bool? IsActivity {get;set;}

           /// <summary>
           /// Desc:邮件地址
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string MailAddress {get;set;}

           /// <summary>
           /// Desc:联系电话
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string Phone {get;set;}

           /// <summary>
           /// Desc:是否保护
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public bool? Protected {get;set;}

           /// <summary>
           /// Desc:上次密码输错时间
           /// Default:
           /// Nullable:True
           /// </summary>           
           public DateTime? PasswordErrorDate {get;set;}

           /// <summary>
           /// Desc:是否允许查询在线用户
           /// Default:
           /// Nullable:True
           /// </summary>           
           public bool? IsInquireOnlineUser {get;set;}

           /// <summary>
           /// Desc:是否允许执行SCADA设计器
           /// Default:
           /// Nullable:True
           /// </summary>           
           public bool? IsRunSCADADesigner {get;set;}

           /// <summary>
           /// Desc:工厂Id
           /// Default:
           /// Nullable:True
           /// </summary>
           [Newtonsoft.Json.JsonConverter(typeof(ValueToStringConverter))]           
           public long? FactoryId {get;set;}

           /// <summary>
           /// Desc:场地Id
           /// Default:
           /// Nullable:True
           /// </summary>
           [Newtonsoft.Json.JsonConverter(typeof(ValueToStringConverter))]           
           public long? SiteId {get;set;}

           /// <summary>
           /// Desc:产品Id
           /// Default:
           /// Nullable:True
           /// </summary>
           [Newtonsoft.Json.JsonConverter(typeof(ValueToStringConverter))]           
           public long? ProductId {get;set;}

           /// <summary>
           /// Desc:开始检查日期
           /// Default:
           /// Nullable:True
           /// </summary>           
           public DateTime? CheckStartDate {get;set;}

           /// <summary>
           /// Desc:结束检查日期
           /// Default:
           /// Nullable:True
           /// </summary>           
           public DateTime? CheckEndDate {get;set;}

           /// <summary>
           /// Desc:不进行检查
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public bool? NoCheckEndDate {get;set;}

           /// <summary>
           /// Desc:班次Id
           /// Default:
           /// Nullable:True
           /// </summary>
           [Newtonsoft.Json.JsonConverter(typeof(ValueToStringConverter))]           
           public long? ShiftId {get;set;}

           /// <summary>
           /// Desc:分组Id
           /// Default:
           /// Nullable:True
           /// </summary>
           [Newtonsoft.Json.JsonConverter(typeof(ValueToStringConverter))]           
           public long? GroupsId {get;set;}

           /// <summary>
           /// Desc:是否在线
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public bool? IsOnline {get;set;}

           /// <summary>
           /// Desc:照片
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string FtpPhoto {get;set;}

           /// <summary>
           /// Desc:最后一次登陆资原
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string LatestActiveResource {get;set;}

           /// <summary>
           /// Desc:最后一次活动的插件
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string LatestActivePlugin {get;set;}

           /// <summary>
           /// Desc:最后一次活动时间
           /// Default:
           /// Nullable:True
           /// </summary>           
           public DateTime? LatestActiveDate {get;set;}

           /// <summary>
           /// Desc:车间Id
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string WorkshopId {get;set;}

           /// <summary>
           /// Desc:员工状态，离职，在职
           /// Default:N'在职'
           /// Nullable:False
           /// </summary>           
           public string UserStatus {get;set;}

           /// <summary>
           /// Desc:进入系统时自动允许的插件命令
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string AutoRunPluginCommand {get;set;}

           /// <summary>
           /// Desc:是否为系统登入账户
           /// Default:1
           /// Nullable:True
           /// </summary>           
           public bool? IsAccount {get;set;}

           /// <summary>
           /// Desc:是否供应商
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public bool? IsVendorUser {get;set;}

           /// <summary>
           /// Desc:是否为原厂商用户
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public bool? IsOMFUser {get;set;}

           /// <summary>
           /// Desc:是否管理员
           /// Default:0
           /// Nullable:True
           /// </summary>           
           public bool? IsAdmin {get;set;}

           /// <summary>
           /// Desc:员工工号
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string EmployeeNo {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>
           [Newtonsoft.Json.JsonConverter(typeof(ValueToStringConverter))]           
           public long? WorkcenterId {get;set;}

           /// <summary>
           /// Desc:修改日期
           /// Default:DateTime.Now
           /// Nullable:True
           /// </summary>           
           public DateTime? ModifyDate {get;set;}

           /// <summary>
           /// Desc:创建人
           /// Default:
           /// Nullable:True
           /// </summary>
           [Newtonsoft.Json.JsonConverter(typeof(ValueToStringConverter))]           
           public long? CreateUserId {get;set;}

           /// <summary>
           /// Desc:创建日期
           /// Default:DateTime.Now
           /// Nullable:True
           /// </summary>           
           public DateTime? CreateDate {get;set;}

           /// <summary>
           /// Desc:
           /// Default:
           /// Nullable:True
           /// </summary>           
           public string LogonLimitedPC {get;set;}

    }
}
